home *** CD-ROM | disk | FTP | other *** search
- #include <string.h>
- #include <ctype.h>
- #include <errno.h>
- #include <string.hpp>
-
- int operator>(const String &a, const String &b)
- {
- int c, m = a.length(), n = b.length(), l = m > n? n: m;
- if ((c = memcmp(a.body(),b.body(),l)) > 0) return 1;
- if (!c && m > n) return 1;
- return 0;
- }
-
- int operator>(const String &a, const char *s)
- {
- int c, m = a.length(), n = strlen(s), l = m > n? n: m;
- if ((c = memcmp(a.body(),s,l)) > 0) return 1;
- if (!c && m > n) return 1;
- return 0;
- }
-
- int operator>(const char *s, const String &a)
- {
- int c, m = strlen(s), n = a.length(), l = m > n? n: m;
- if ((c = memcmp(s,a.body(),l)) > 0) return 1;
- if (!c && m > n) return 1;
- return 0;
- }
-